package practice_0527;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class practice08_Callable_ {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask<String> ft = new FutureTask<>(new Callable_());
        Thread thread = new Thread(ft);
        thread.start();
        System.out.println("线程的返回值是：\n"+ ft.get());

    }
}
class Callable_ implements Callable<String> {

    @Override
    public String call() throws Exception {
        return "请查收：已通过实现Callable接口实现线程!";
    }
}
